Back to Projects

Placement Portal

A full-stack placement & job portal: React SPA, Go API, Python background worker, PostgreSQL and Redis — shipped with Docker Compose and deployed to a local Kubernetes (Kind) cluster.

React 19 Go 1.25 + Gin Python worker PostgreSQL 16 Redis 7 Docker Kubernetes (Kind)

1. High-level architecture

Four services in a monorepo, orchestrated by Docker Compose. The browser only ever talks to Nginx; Nginx proxies /api and /files to the Go API.

BrowserReact SPA Nginx:80 static + proxy Go API (Gin):8080 REST + JWT PostgreSQLGORM · :5432 Redistasks:worker queue Storagepfps / resumes / logos Python WorkerBRPop · resume · email public network: Nginx + APIinternal network: Postgres, Redis, API, Worker
● HTTP / SQL   ● queue tasks   ● file I/O. The API and worker mount the same ./backend/storage volume, so worker-generated resumes are instantly downloadable.

2. Tech stack

Each service has one clear job.

🖥 Frontend

React 19.2, Vite 8, React Router 7 (role-based ProtectedRoute), Tailwind 4, shadcn/ui, zustand (auth store), axios (Bearer token, 401 → /login), sonner, zod, next-themes. Served by Nginx.

⚙️ Go API

Go 1.25, Gin 1.12, GORM 1.31 with AutoMigrate, pgx/v5, go-redis/v9, JWT HS256 (72h), bcrypt cost 12, godotenv, JSONB via gorm datatypes.

🐍 Worker

Python + redis-py blocking on BRPop tasks:worker. Handlers: generate_resume, send_email, recruiter / student notifications via Resend.

🗄 Data & queue

PostgreSQL 16-alpine and Redis 7-alpine with named volumes, healthchecks (pg_isready, redis-cli ping) and service_healthy startup ordering.

3. Data model

All tables use GORM soft deletes.

TableKey columns
studentsemail (unique), password_hash, branch, cgpa, passing_year, resume_ready, resume_source; JSONB: domains, work_experience, projects, education, certificates
recruitersemail (unique), domain, about, num_employees, logo_file_name
adminsemail (unique), password_hash, role
listingstitle, type (remote/on-site), job_type (internship/full-time), is_open, skills, vacancies, applications_num, salary_min/max, experience_years, expires_at, recruiter_id → recruiters
applicationsstudent_id → students, listing_id → listings, status (applied → shortlisted → selected / rejected), applied_at

4. Request workflows

Pick a flow — the steps play automatically.

    Async resume generation — queue in motion

    Go APILPush gen_resume Redis listtasks:worker (FIFO) Python workerBRPop, 5s timeout PDFstorage/resumes
    The student gets an email (notify_student_resume_ready) and downloads via /resume/download with Content-Disposition: attachment.

    5. Kubernetes deployment (Kind)

    Cluster placement-cluster — Kubernetes v1.35.1 (kindest/node), 1 control-plane (ingress-ready=true) + 1 worker. Host ports 80/443 map into the ingress.

    User :80 NGINX Ingress/api /files / api-serviceGo pod :8080 frontend-svcNginx pod :80 Neon Postgresexternal, via Secret Redis STS256Mi PVC storage-pvc2Gi hostPath RWX Worker1 replica

    Manifests

    namespace · configmap (GIN_MODE=release) · secret · storage-pvc · postgres · redis · api · worker · frontend · ingress

    API pod

    Init wait-for-redis; startup/readiness/liveness probes on /api/health and /api/health/ready; 128Mi/100m requests, 256Mi/300m limits.

    Worker pod

    Inits wait-for-redis and fix-storage-permissions (chown 1000); fsGroup: 1000; 256Mi/100m requests, 512Mi/300m limits.

    Ingress

    Class nginx, regex paths, proxy-body-size 20m, proxy-read-timeout 120s.

    6. DevOps workflow (today)

    A manual but repeatable flow — each stage lights up in turn.

    💻Code & commit
    →
    🐳docker build
    →
    📦push to Docker Hub
    →
    ☸️kubectl apply
    →
    🔄rollout restart
    →
    🌐localhost via Ingress

    Images: zorochuro1234/placement-backend:localv2, placement-worker:localv1, placement-frontend:localv2. imagePullPolicy: Always lets a rollout restart pull the new image.

    1 · Provision

    ./install.sh (Docker, Kind v0.29.0, kubectl) then kind create cluster --config kind-config.yaml --name placement-cluster.

    2 · Ingress

    Apply the ingress-nginx Kind provider manifest so port 80/443 reach the cluster.

    3 · Deploy in order

    namespace → storage → configmap → secret → postgres → redis → api → worker → frontend → ingress.

    4 · Monitor

    Kubernetes Dashboard via a cluster-admin ServiceAccount. No Prometheus, Grafana or Loki yet.

    Target pipeline

    🔀Git push
    →
    🧪Lint & tests
    →
    🏗Buildx image
    →
    🏷Tag git-sha
    →
    🚀ArgoCD / Flux
    →
    ✅Rolling update + probes